package com.iotechn.unimall.app.api.plantgoods;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.PlantGoodsHistoryDO;
import com.iotechn.unimall.data.model.Page;

import java.util.List;

/**
 * Created by rize on 2019/7/1.
 */
@HttpOpenApi(group = "plantGoodsHistory", description = "商品服务")
public interface PlantGoodsHistoryService {

    @HttpMethod(description = "搜索Goods列表")
    public Page<PlantGoodsHistoryDO> getPlantGoodsHistoryPage(
            @HttpParam(name = "pageNo", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer pageNo,
            @HttpParam(name = "pageSize", type = HttpParamType.COMMON, description = "页码长度", valueDef = "10") Integer pageSize,
            @HttpParam(name = "categoryId", type = HttpParamType.COMMON, description = "搜索分类") Long categoryId,
            @HttpParam(name = "orderBy", type = HttpParamType.COMMON, description = "排序 id 或 sales", valueDef = "id") String orderBy,
            @HttpParam(name = "isAsc", type = HttpParamType.COMMON, description = "是否升序", valueDef = "false") Boolean isAsc,
            @HttpParam(name = "title", type = HttpParamType.COMMON, description = "搜索标题") String title) throws ServiceException;


    @HttpMethod(description = "首页使用")
    public List<PlantGoodsHistoryDO> getPlantGoodsHistoryList(
            @HttpParam(name = "pageNo", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer pageNo,
            @HttpParam(name = "pageSize", type = HttpParamType.COMMON, description = "页码长度", valueDef = "10") Integer pageSize) throws ServiceException;

    @HttpMethod(description = "单品三个月的价格情况")
    public List<PlantGoodsHistoryDO> getPlantGoodsHistoryListById(
            @HttpParam(name = "title", type = HttpParamType.COMMON) String title) throws ServiceException;

}
